package com.financing.platform.dao.impl;



import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IProjectSupplierDao;
import com.financing.platform.dto.ProjectSupplierDTO;
import com.financing.platform.util.SqlName;
@SuppressWarnings("unchecked")
@Repository("projectSupplierDaoImpl")
public  class ProjectSupplierDaoImpl extends BaseDaoImpl 
		implements IProjectSupplierDao { 



	@Override
	public List<ProjectSupplierDTO> getProjectSupplierList(
			ProjectSupplierDTO projectSupplierDTO) throws SQLException {
		return (List<ProjectSupplierDTO>)this.sqlMapClient.queryForList(SqlName.queryProjectSupplierList, projectSupplierDTO);
	}

	@Override
	public ProjectSupplierDTO getProjectSupplierById(ProjectSupplierDTO projectSupplierDTO)
			throws SQLException {
		return (ProjectSupplierDTO) this.sqlMapClient.queryForObject(SqlName.queryProjectSupplierInfo, projectSupplierDTO);
	}

	@Override
	public int addProjectSupplier(ProjectSupplierDTO projectSupplierDTO)
			throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.addProjectSupplier, projectSupplierDTO);
	}

	@Override
	public int queryProjectSupplierCount(ProjectSupplierDTO projectSupplierDTO)
			throws SQLException {
		return (Integer)this.sqlMapClient.queryForObject(SqlName.queryProjectSupplierCount, projectSupplierDTO);
	}

	@Override
	public int delProjectSupplier(int projectSupplierId) throws SQLException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateProjectSupplier(ProjectSupplierDTO projectSupplierDTO)
			throws SQLException {
		return this.sqlMapClient.update(SqlName.updateProjectSupplier, projectSupplierDTO);
	}

}
